package com.lfsenior.broker;

import org.apache.activemq.broker.BrokerService;

/**
 * Created by dlupan on 2018/11/1
 */
public class InnerBroker {
    public static void main(String[] args) throws Exception{
        // 创建BrokerService
        BrokerService broker = new BrokerService();
        // 启动broker的JMX监控功能
        broker.setUseJmx(true);
        // 设置broker名字
        broker.setBrokerName("InnerBroker");
        // 设置是否使用持久化
        broker.setPersistent(false);
        // 添加连接协议、地址
        broker.addConnector("tcp://localhost:61616");
        //启动broker
        broker.start();
    }
}
